<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>货品管理</title>
    <script type="text/javascript" src="__STATIC__/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="__STATIC__/hdjs/hdjs.min.js"></script>
    <link rel="stylesheet" href="__STATIC__/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" href="__STATIC__/hdjs/hdjs.css" />
</head>
<body>
<div class="wrap">
    <form onsubmit="return hd_submit(this,'{|U:'GoodsList/add'}','{|U:'GoodsList/index',array('gid'=>$gid)}')" action="javascript:;" method="post" class="form-inline hd-form">
        <table class="hd-table hd-table-list" style="text-align:center">
            <thead>
            <tr>
                <td width="70">货品id</td>
                <td width="100">颜色</td>
                <td width="150">尺码</td>
                <td width="70">库存</td>
                <td width="50">货号</td>
                <td width="150">操作</td>
            </tr>
            </thead>
            
            <tr>
                <td>
                    <input type="submit" value="添加货品" class="btn btn-info btn-sm" />
                    <input type="hidden" name="f_goods_gid" value="{$hd.get.gid}" />
                </td>
                <td>
                    <select name="color" id="">
                        <option value="0">请选择</option>
                        <foreach from="$color" key="$k" value="$v">
                            <option value="{$k}">{$v}</option>
                        </foreach>
                    </select>
                </td>
                <td>
                    <select name="size" id="">
                        <option value="0">请选择</option>
                        <foreach from="$size" key="$k" value="$v">
                            <option value="{$k}">{$v}</option>
                        </foreach>
                    </select>
                </td>
                <td>
                    <input type="text" name="many" id="" />
                </td>
                <td>
                    <input type="text" name="num" id="" />
                </td>
                <td></td>
            </tr>
            <tbody>
                <foreach from="$data" key="$k" value="$v">
                    <tr>
                        <td>{$v['glid']}</td>
                        <td>{$v.color.gavalue}</td>
                        <td>{$v.size.gavalue}</td>
                        <td>{$v['many']}</td>
                        <td>{$v['num']}</td>
                        <td>
                            <a href="{|U:'GoodsList/edit',array('glid'=>$v['glid'])}" class="btn btn-primary btn-sm">编辑</a>
                            <a href="javascript:;" class="btn btn-danger btn-sm" onclick="if(confirm('确定要删除吗？')) location.href='{|U:'GoodsList/del',array('glid'=>$v['glid'])}'">删除</a>
                        </td>
                    </tr>
                </foreach>
            </tbody>
        </table>
    </form>
    <div class="page_hdjob">
      
    </div>
</div>

</body>
</html>


